// $codepro.audit.disable
package edu.gatech.oad.cyberdoc.view.menu;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.BorderFactory;
import javax.swing.BoxLayout;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.Box;

import edu.gatech.oad.cyberdoc.presenter.Presenter;
import edu.gatech.oad.cyberdoc.view.MainFrame;

import java.awt.Component;
import java.awt.Dimension;

public class PatientMenu extends JPanel {

	/**
	 * Create the panel.
	 */
	public PatientMenu() {
		setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));

		JButton btnRequestAppointment = new MenuButton("Request Appointment");
		btnRequestAppointment.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				Presenter.getInstance().requestAppointment();
			}
		});

		add(btnRequestAppointment);


		JButton btnViewTreatmentRecords = new MenuButton("View Treatment Records");
		btnViewTreatmentRecords.addActionListener(new ActionListener(){
			public void actionPerformed(ActionEvent arg0) {
				Presenter.getInstance().viewTreatmentRecord();
			}
		});
		add(btnViewTreatmentRecords);

		JButton btnViewYourInformation = new MenuButton("View Your Information");
		btnViewYourInformation.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				MainFrame.getInstance().show("view_info", null);
				
			}
		});
		add(btnViewYourInformation);
		
		MenuButton btnViewInvoice = new MenuButton("View Invoice");
		btnViewInvoice.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				Presenter.getInstance().viewInvoiceList();
			}
		});
		add(btnViewInvoice);

		Component rigidArea = Box.createRigidArea(new Dimension(0, 20));
		add(rigidArea);

		JButton btnLogout = new MenuButton("Logout");
		btnLogout.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				Presenter.getInstance().logout();
			}
		});
		add(btnLogout);

	}

}
